package com.deram.ctin.serv.enter.api;

import com.deram.ctin.common.bean.PageResult;
import com.deram.ctin.serv.enter.entity.BaseUpdateInfo;
import com.deram.ctin.serv.enter.entity.EnterRecruit;
import com.deram.ctin.serv.enter.filter.EnterRecruitFilter;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: jtt
 * @Description:
 * @Date: 2017/9/12 15:20
 * @version: V1.0
 */
@FeignClient("serv-enter")
@RequestMapping("/enterRecruitApi")
public interface EnterRecruitApi {

    @PostMapping("/list")
    List<EnterRecruit> list(@RequestBody EnterRecruitFilter filter);

    @PostMapping("/save")
    EnterRecruit save(@RequestBody EnterRecruit param);

    @PostMapping("/delete")
    void delete(@RequestParam("id") Long id);

    /**
     * saveList 会先删除以前的 然后保存上传的
     * @param updateInfo
     */
    @PostMapping("/saveList")
    void saveList(@RequestBody BaseUpdateInfo<EnterRecruit> updateInfo);

    @PostMapping("/search")
    PageResult<EnterRecruit> search(@RequestBody EnterRecruitFilter filter, @RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize);
}
